<?php


namespace Yond\LaravelDomain\Console;


use Symfony\Component\Console\Input\InputOption;

abstract class AppGenerator extends GeneratorCommand
{
    protected $appName;
    protected $sectionName;

    protected $defaultOptions = [
        ['app', null, InputOption::VALUE_REQUIRED, 'The name of the app'],
        ['section', null, InputOption::VALUE_NONE, 'The name of the section'],
    ];


    /**
     * @return bool|null
     */
    public function handle()
    {
        $this->appName = ucfirst(trim($this->optionOrAsk('app', 'Please enter the name of app')));
        $this->sectionName = trim($this->optionOrAsk('app', 'Please enter the name of section'));

        return parent::handle();
    }
}